<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Low-Battery-Yup/DDHotKey, branch master</title>
<subtitle>Dismiss Mac OS X's low battery warning dialog with the keyboard</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Low-Battery-Yup/'/>
<entry>
<title>Use hard-coded hotkey to invoke battery dialog dismisser</title>
<updated>2016-11-19T03:54:19+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2016-11-19T03:54:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Low-Battery-Yup/commit/?id=678f8ca1a961eb9125aa82b7d2277fda4db7f146'/>
<id>678f8ca1a961eb9125aa82b7d2277fda4db7f146</id>
<content type='text'>
* Add DDHotKey library to the project. Just copy the files in from the
  latest HEAD@e0481f648e0bc7e55d183622b00510b6721152d8.
* Only add DDHotKeyCenter.{h,m} &amp; DDHotKeyUtilities.{h,m} to the "Low
  Battery Yup.d" target as the *TextField file is only useful for a UI
  to choose a hotkey, and we don't have a UI in this target.
* Set the DDHotKey* files to use ARC when compiling since they require
  it. This was done by going to Build Phases -&gt; Compile Sources and
  adding this flag for both files:

      -fobj-arc

  this I figured out thanks to the following SO post:

    http://stackoverflow.com/questions/6448874/disable-automatic-reference-counting-for-some-files/10255815#10255815

* Link Carbon.framework because DDHotKey depends on it to register
  global hotkeys
* Move our mouse moving &amp; clicking code to a new method that gets used
  as the global hotkey action
* Fix a runtime error caused by MainMenu.xib not being available (as a
  result of f0e8b5188e6fb984511eb01849380669e69632a6). To do this, we
  modify `main.m` to bypass the check for MainMenu.xib as described in
  this SO post:

    http://stackoverflow.com/questions/6945872/cocoa-app-without-a-mainmenu-xib/6946016#6946016

* Delete the `window` `IBOutlet` since we no longer have a MainMenu.xib
  and don't have a window in this app.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add DDHotKey library to the project. Just copy the files in from the
  latest HEAD@e0481f648e0bc7e55d183622b00510b6721152d8.
* Only add DDHotKeyCenter.{h,m} &amp; DDHotKeyUtilities.{h,m} to the "Low
  Battery Yup.d" target as the *TextField file is only useful for a UI
  to choose a hotkey, and we don't have a UI in this target.
* Set the DDHotKey* files to use ARC when compiling since they require
  it. This was done by going to Build Phases -&gt; Compile Sources and
  adding this flag for both files:

      -fobj-arc

  this I figured out thanks to the following SO post:

    http://stackoverflow.com/questions/6448874/disable-automatic-reference-counting-for-some-files/10255815#10255815

* Link Carbon.framework because DDHotKey depends on it to register
  global hotkeys
* Move our mouse moving &amp; clicking code to a new method that gets used
  as the global hotkey action
* Fix a runtime error caused by MainMenu.xib not being available (as a
  result of f0e8b5188e6fb984511eb01849380669e69632a6). To do this, we
  modify `main.m` to bypass the check for MainMenu.xib as described in
  this SO post:

    http://stackoverflow.com/questions/6945872/cocoa-app-without-a-mainmenu-xib/6946016#6946016

* Delete the `window` `IBOutlet` since we no longer have a MainMenu.xib
  and don't have a window in this app.
</pre>
</div>
</content>
</entry>
</feed>
